import 'package:flutter/material.dart';
import 'package:wowhy/service_locator.dart';
import 'package:wowhy/services/navigate_service.dart';

class DemoPage extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text('Demo Page'),
      ),
      body: GridView(
        gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
          crossAxisCount: 3,
          childAspectRatio: 1,
        ),
        children: <Widget>[
          InkWell(
            child: Center(
              child: Text('Picker Demo'),
            ),
            onTap: () {
              getIt<NavigateService>().pushNamed('picker_demo');
            },
          ),
          InkWell(
            child: Center(
              child: Text('Scan Demo'),
            ),
            onTap: () {
              getIt<NavigateService>().pushNamed('scan_demo');
            },
          )
        ],
      ),
    );
  }
}
